@keyframes appear {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.servers__controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;

  @media screen and (max-width: 680px) {
    flex-direction: column;
  }
}

.servers__filters,
.servers__info {
  margin-bottom: 0.5rem;
}

.servers__counts {
  margin-right: 1rem;
}

.servers__list {
  width: 100%;
}

.servers__list__header__status {
  width: 105px;
}

.servers__list__header__players {
  width: 105px;
}

.servers__list__header__location {
  width: 145px;
}

.servers__list__header__sort-toggle {
  white-space: nowrap;
}

.servers__list__header__sort-toggle .icon {
  opacity: 0.25;
  transition: all 300ms $ease-in-out-quint;
}

.servers__list__header__sort-toggle--descending .icon,
.servers__list__header__sort-toggle--ascending .icon {
  opacity: 1;
}

.servers__list__header__sort-toggle--descending .icon {
  transform: rotateZ(-180deg);
}

.servers__list__group {
  cursor: pointer;

  & > td {
    background: black;
  }
}

.servers__list__group__info {
  display: flex;
  align-items: center;
  min-height: 32px;
}

.servers__list__group__mod-icon {
  flex-shrink: 0;
  flex-grow: 0;
  margin-right: 0.5rem;
  width: 32px;
  height: 32px;
}

.servers__list__group__version {
  margin-right: 1rem;
  text-transform: uppercase;
  font-size: $font-size-tiny;
}

.servers__list__group__mod-link {
  margin-right: 0.5rem;
}

.servers__listing__name .icon {
  width: 1rem;
  height: 1rem;
  vertical-align: -0.1rem;
  margin-right: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
}

.servers__listing__join {
  width: 85px;
  margin-left: 1rem;
}

.servers__listing__status__badge--waiting {
  color: orange;
}

.servers__listing__status__badge--playing {
  color: green;
}

.servers__listing__status__badge--empty {
  color: gray;
}

.servers__listing__spectators {
  margin-left: 0.25rem;
  color: rgba(255, 255, 255, 0.5);

  .icon {
    margin-left: 0.15rem;
    vertical-align: -0.2rem;
  }
}

.servers__list__tooltip-container {
  position: relative;
  z-index: $z-servers-list-tooltip;
}

.servers__list__tooltip {
  @include metalPanel(1px);
  display: flex;
  background: black;
  font-size: $font-size-tiny;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.5);
  animation-name: appear;
  animation-duration: 250ms;
  animation-timing-function: $ease-in-out-quint;

  @media (prefers-reduced-motion) {
    animation: none;
  }
}

.servers__list__tooltip__map {
  width: 220px;
  border-top-left-radius: 5px;
  border-right: rgba(255, 255, 255, 0.25) 1px dotted;
  align-self: stretch;
  // overflow: hidden;

  @media screen and (max-width: 680px) {
    width: 170px;
  }
}

.servers__list__tooltip__map__title {
  width: 100%;
  padding: 0.5rem;
  text-align: center;
  font-weight: bold;
  line-height: 1.25rem;
}

.servers__list__tooltip__clients {
  max-height: 330px;
  min-width: 220px;
  overflow: hidden;

  .icon {
    vertical-align: -0.25rem;
  }

  table {
    width: 100%;
  }

  th {
    position: sticky;
    top: 0;
  }
}

.servers__list__tooltip__clients__spectator {
  margin-left: 0.5rem;
}

.servers__list__tooltip__clients__spawn {
  @extend %spawnpoint;
  margin-right: 0.5rem;
}

.servers__list__tooltip__clients__empty {
  color: gray;
}
